dayup=1.0
dayfactor=0.01
for i in range(365):
    if i%7 in [6,0]:
        dayup=dayup*(1-dayfactor)
    else:
        dayup=dayup*(1+dayfactor)
print("向上5天向下2天：{:.2f}".format(dayup))

dayup=1.0
dayfactor=0.01
while True:
    dayup=dayup*(1+dayfactor)
    for i in range(365):
        if i%7 in [6,0]:
            dayup=dayup*(1-dayfactor)
    if dayup>37.78:
        break
print("每天努力：{:.3f}".format(dayfactor))